import { IsArray, IsString, ValidateNested, IsNotEmpty } from 'class-validator';
import { Type } from 'class-transformer';

export class MessageDto {
  @IsString()
  @IsNotEmpty()
  name: string;

  @IsString()
  @IsNotEmpty()
  message: string;
}

export class CreateOpenaiDto {
  @IsArray()
  @ValidateNested({ each: true })
  @Type(() => MessageDto)
  message: MessageDto[];
}
